<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>RemoteAnt Task</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
</head>

<body>

<h2><a name="ant">RemoteAnt</a></h2>
<h3>Description</h3>

<p>Runs Ant tasks on a remote host or remotehosts. it will generate a default build file and build target , send the build file to the remote host or hosts, execute the generated target, and then send results back. </p>

<p>Parameters</p>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>
    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">hostref</td>
    <td valign="top">reference a remote host.if hostref or hostsetref both not specified, the command will execute locally </td>
    <td valign="top" align="center">NO</td>
  </tr>
  <tr>
    <td valign="top">hostsetref</td>
         <td valign="top">reference remote hosts. if hostref or hostsetref both not specified, the command will execute locally </td>
         <td valign="top" align="center">NO</td>
  </tr>
  <tr>
    <td valign="top">dir</td>
    <td valign="top">the directory name on the remote host, if it is not an absolute dir, the host's base dir will be instered before this dir. </td>
    <td valign="top" align="center">Yes</td>
  </tr>
  <tr>
    <td valign="top">transmit</td>
    <td valign="top">whether or not  transmit the command to the remote host, default value is YES, if set to NO, just print the command in standard output. </td>
    <td align="center" valign="top">No</td>
  </tr>
</table>

<h3>Nested elements</h3>

<h4><strong>Any ant tasks</strong></h4>
<p>&nbsp;</p>

<h3>Examples</h3>
<pre>&lt;remoteant hostref=&quot;summerpalace&quot; dir=&quot;tmp&quot; transmit=&quot;on&quot;&gt;<br>  &lt;echo message=&quot;hello world!&quot;/&gt;<br>&lt;/remoteant&gt;</pre>

<p>what happens here is, remoteant will genreate an default ant build file and a default bulid target</p>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project name=&quot;spawned project&quot; basedir=&quot;.&quot; default=&quot;spawned target&quot;&gt;<br>  &lt;target name=&quot;spawned target&quot;&gt;<br>    &lt;echo message=&quot;hello world!&quot;/&gt;<br>  &lt;/target&gt;<br>&lt;/project&gt;</pre>

<p>and this build file  will be send to the remote host, in this testcase it is host <strong>summerpalace</strong> and the build file will be executed in <strong>/local/workspace/tmp</strong> directory on <strong>summerpalace</strong> . </p>

<hr>
<p align="center">Copyright &copy; 2005 Dant Organization. All rights Reserved.</p>

</body>
</html>
